Page({
  data: {
    mobile: '',
    password: '',
    code: '',
    isSend: false,
    btnSendText: '获取验证码' //倒计时格式：(60秒)
  },
  inputCode(e) {
    this.setData({
      code:e.detail.value
    })
  },
  inputMobile: function(e) {
    this.setData({
      mobile:e.detail.value
    })
  },
  inputPwd: function(e) {
    this.setData({
      password:e.detail.value
    })
  },
  clearInput(e) {
    let type = e.currentTarget.dataset.type
    if (type == 1) {
      this.setData({
        mobile:''
      })
    } else {
      this.setData({
        password:''
      })
    }
  }
})